package com.seal.commons.utils.serializer;


/**
 * ClassName:ObjectSerializer <br/>
 * Funct：    rocketMQ发送消息的序列化 <br/>
 * Date:     2019-06-05 10:19 <br/>
 *
 * @author yong.huang
 * @see
 * @since JDK 1.8
 */
public final class ObjectSerializer {

    private static ProtostuffSerializer getSerializer() {
        return new ProtostuffSerializer();
    }

    public static  byte[] serialize(Object  object){
        return getSerializer().serialize(object);
    }

    public  static Object deserialize(byte[] bytes, Class clazz){
        return getSerializer().deserialize(bytes, clazz);
    }

}
